import { NextResponse } from 'next/server'
import { checkAuth } from '@/lib/auth'

export async function GET() {
    try {
        await checkAuth()
        return NextResponse.json({ isAuthenticated: true })
    } catch (error) {
        return NextResponse.json(
            { isAuthenticated: false },
            { status: 401 }
        )
    }
}